﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="NhaDatBanThueMoiTrangCon.ascx.cs" Inherits="WebHousingInfo.Controls.NhaDatBanThueMoiTrangCon" %>
<div id="khonggiansong">
    <% var Obbanmoi = HousingInfo.Library.NewsHouseBOList.LayTinmoi_TheoDanhMuc(5,1);
       int count = 0; %>
    <div class="title">NHÀ ĐẤT BÁN MỚI</div>
    <div class="content">
        <% foreach (var detailNews in Obbanmoi)
           {
               count += 1; %>
            <div class="data clearfix">
                <% if (detailNews.UrlImage != "")
                    {
                        var listimage = detailNews.UrlImage.Split('/');
                        string url = "";
                        foreach (var detail in listimage)
                        {
                            if (checkurlimage(detail) == true)
                            {
                                url = "TotalUpload/ImagesTotal/" + detail;                                    
                                        
                                    
                                 %><a href="TinNhaDatChiTiet.aspx?id=<%=detailNews.NewsHouseID %>"><img src="<%=url %>" width="80" height="70" border="0" align="left" /></a><% break;
                            }
                        }
                        if (url == "")
                        { %><a href="TinNhaDatChiTiet.aspx?id=<%=detailNews.NewsHouseID %>"><img src="TotalUpload/ImagesTotal/noimage.gif" width="80" height="70" border="0" align="left" /></a>
                        <% }
                    }
                    else
                    { %>
                        <a href="TinNhaDatChiTiet.aspx?id=<%=detailNews.NewsHouseID %>"><img src="TotalUpload/ImagesTotal/noimage.gif" width="80" height="70" border="0" align="left" /></a>
                    <%} %>
	            
	            <p><a href="TinNhaDatChiTiet.aspx?id=<%=detailNews.NewsHouseID %>"><%=detailNews.Title%></a></p>
	            <% if (detailNews.NewsContent.Length > 85)
                {%>
                    <%=detailNews.NewsContent.Substring(0, 75)%> ...
                <%}
                else
                {%>
                 <%=detailNews.NewsContent%>
                <%} %>
            </div>
            <% if(count < Obbanmoi.Count) { %>
            <div class="line"></div>		
            <%} %>
        <%} %>		
    </div>
    <div class="footer">
        <a href="XemTinTheoQuanHuyen.aspx?cateid=1">xem thêm</a>
    </div>		
</div>